CBMSTEVE.CA - Steve J. Gray's Homepage
CBMSTEVE.CA - Personal pages of Steve J. Gray
Changes Info Prototypes Remakes PET Projects CBM Projects Modding 3D Models KiCad Github Ohio Scientific Other My Software My Collections Facebooks

The SuperColourPET Project

INTRODUCTION

Welcome! This is a project to create a Commodore SuperPET compatible computer with Colour. My ColourPET project aimed to add colour to a standard PET computer. While successful, ultimately I determined that adding all the features I wanted, like 80 column mode and graphics, would require too much hacking of a PET motherboard to be practical. So, I moved on to other projects. Recently I worked on the CLCD recreation project which provided the foundation for a nice 80 column 16-colour RGBI video using a 8563 VDC chip. This chip also supports graphics and software-defined fonts. I've also been interested in the dual-CPU SuperPET, with a 6809 CPU. So naturally I thought why not combine these things together? The result is the SuperColourPET (SCP). On top of that I wanted to go one more step to add a Z80 CPU for CP/M capabilities.

Recently there has been interest in PET replacement boards fitting in standard PET cases and talk of also putting them in C64 cases. Why not both? So I've come up with a single board design that will fit in PET, C64 (breadbin), and 64C cases. When installed in a PET case all three ports on the back will be the same as a regular PET board. The 2nd cassette port will be available on a header. When installed in a C64-type case it provides access to a C64 compatible audio/video port, semi-compatible C64 cartridge port, IEC port, power, and two configurable joystick ports. The board only takes up 2/3 of the C64 case and the C64 cassette and user-port cutouts will be free. I will be designing different boards that can be mounted here for access to PET cassette and USER port, or to IEEE and RGBI port etc. All the ports on the board have headers so you can select which ports you want to extend out those two openings.

My PET/CBM EditorROM project allows you to create custom editor ROMs for the PET. It adds support for C64/VIC keyboards on the PET, Colour, extended screen sizes, enhanced screen editing and additional features like soft reboot, built-in wedge, custom banners etc.

C64 cases and keyboards are plentiful with several new recreations available now too.

Some of the things I wanted was to have the ability for the PET to use common IEC devices for disk storage since IEEE drives are harder to get and more expensive. I also want people to be able to use existing composite monitors for display and audio output. I also though it might be nice to have two SID chips for stereo audio output. Lastly, I'm hoping to be able to clock the CPU's faster for better performance.

All pcbs will be designed with Kicad. Full design files will be made available when they are usable.

STATUS OVERVIEW

This project will coincide with my CLCD project as I learn CPLD programming. Please have patience!

MAINBOARD

Multiple PET schematics were studied: 4032, 8032, 8296, SuperPET. The essential elements of each of these machines is included on the mainboard. All these elements are tied together with a CPLD chip. It will control all RAM, ROM and IO chip selects and additional address lines for extented memory. It will have control registers for mmu and extended features.

The PET used a 6502 DIP CPU @ 1MHz. I decided to go with a 65C02 CMOS processor that can run up to 14MHz. The 65C02 processor has additional opcodes, but most, if not all existing firmware and PET software do not use the original 6502 "illegal opcodes" so it should not be an issue. Similarly, the SuperPET used a 6809 CPU which I have replaced with an enhanced 63C09 CPU. The 63C09 CPU also has additional features and can be clocked faster than the 6809. Lastly, I have added a Z84C020 Z80-compatible chip that can run up to 20Mhz. Although the Z80 was not used by Commodore on the PET, there were 3rd-party Z80 boards for the PET. Later with the C64 and C128, Commodore added Z80 capabilities, so I felt the Z80 should be included in my design for completeness. All these CPU chips come in PLCC packages which are smaller than the old DIP packages of the original chips. One of the main advantages of using these newer chips is that all of them can be made to tri-state their buss and control lines effectively removing them from the rest of the system. This allows all three CPU's to co-exist on one board (but only one can be active at any time). It should be possible to clock all these chips faster than their original implementations. I have included two clock oscillators on the board; 16MHz and 14.31818MHz. The 16MHz is like the original PET clock which provided the video picel clock and then divided down to provide the 1MHz CPU clock. The 14MHz clock is provided for the clock input to the RGB to composite/svideo coverter chip which will generate NTSC video.

The video will be handled with a 8563 VDC chip, which is the same as in the C128 computer. This chip can support up to 64K of video RAM and is a superset of the 6545 CRTC controller used in the original PET machines. The VDC integrates all the circuitry required to generate RGBI video and sync signals. It was originally designed to have up to 64K of DRAM on its own local video RAM buss which was not accessible directly from the CPU, rather you needed to access it via the VDC registers. This would not be compatible to the PET. So, I have replaced the DRAM with a 32K Dual-Port-SRAM (DPRAM) system. This DPRAM can be accessed by the CPU and VDC simultaneously. This DPRAM will be mapped into the CPU address space exactly where the PET's original video ram was located, allowing full compatibility. With 32K of DPRAM there is also an additional 32K of space free in the VDC's space. I have also mapped an additional 32K of SRAM and 32K of FONT ROM there. The FONT ROM will provide a permanent set of fonts for immediate access. The 32K SRAM can be swapped in here for storing alternate soft-loaded fonts or bitmapped graphics.

I have included 512K of RAM on top of the 32K DPRAM which will act as extended RAM memory. I have also included 1MB of ROM that can hold all of the KERNAL, BASIC, Option ROMS, and additional custom APPS. There is more RAM and ROM than on the original machines that can be utilized in the future.

There are PIA and VIA chips just like the original, performing the same functions. The PET supported several keyboards, all using an 8x10 matrix. This was implemented with a 4-to-10 decoder chip to provide support for 10 rows. I have replaced this with a 4-to-16 decoder chip to allow support of larger keyboards with up to 8x16 matrix. This will allow CBM-II, C128, or even PC keyboards to be used. I have added an additional VIA chip to control some of the additional features that are planned.

On the original PET the IO space was only partially decoded. This caused the IO chips to appear mirrored at several locations, effectively making the entire IO space unusable by other chips. The SCP's CPLD will fully decode the IO space allowing additional IO chips to be mapped in. There are two SID chips mapped into IO as well as the additional VIA. Both types of SID chips (9V or 12V) are supported. The C64-compatible cartridge port's control lines are fed into the CPLD to allow certain C64 carts to be mapped into the IO space and supported in the future (to be determined).

The board includes a 6551 ACIA which is implemented mostly for the SuperPET's ability to connect to a server using an RS-232 serial connection. The ACIA is also available to the normal PET, however the PET mode does not have native firmware support for RS-232. I am also looking to add this.

There are two joystick ports. Two different joystick "standards" were devised back in the day using the PET user port. In fact, many pet add-ons were implemented via the user port. For this reason the joysticks do not come pre-wired. Only the ground line is wired. All other pins are user-defined. There are headers for the other lines which can be connected to the user port header and/or the SID POTX/Y lines. It's also possible to re-purpose the joystick ports as RS-232 serial or RGBI video ports with a little work.

The IEC port will be implemented using the additional VIA chip which means it can be supported without impacting the existing IEEE interface or other IO chips. The video port is an 8-pin DIN with the same pinout as the C64 port. It can be configured to supply mono audio from the CB2 sound, with stereo via the SID chips. There is a reset button that can be mounted near the power plug if you want to drill a small hole in the case, or you can use the reset header to connect an external switch wherever you like.

The SCP board is roughly divided into two. On the RIGHT SIDE are the core components; CPU's, RAM, ROM, CPLD, cartridge port, and power. The UART chip is also on there. In fact, if you wanted to make a bare minimum triple-CPU computer that used serial IO this would be all you need (ignoring the bottom edge connectors). On the LEFT SIDE are all the PET-specific components; VIA, PIA, VDC, screen RAM, SIDS, control VIA, and keyboard interface. In the MIDDLE are two expansion headers for adding additional cards. These headers include all address and data lines, control lines, and 8 chip-select lines and power.

The PCB is powered via an external 12V barrel jack connector or internal 12V pin header. An adapter will be require for mounting in the PET but this may change in future revisions.

STATUS: PCBs have arrived and I am populating the board and gathering parts Stay tuned for updates.

WORKING: None. In progress.
UNTESTED: All.

KEYBOARD

The SCP can use any keyboard supported in my PET EditorROM Project. These include all original keyboards (N,B, DIN, Qwerty/Qwertz/Azerty), C64/VIC, CBM-II, Plus/4, and C16 etc. Others such as C128 are in development.

I have designed several different MX replacement keyboards for Commodore machines, so if you need a keyboard it's possible to make your own.

For some of my MX keyboard designs I have created custom keycaps using MaxKeyboard.com like I did for the CLCD and V364 project. They offer a Custom Color Printed Keycaps service that uses a dye-sublimation process. Each key can be a different colour, from a choice of over a dozen colours. You provide the vector artwork for each key using their keyboard templates. You can put basically anything you want on each key.

STATUS: Complete

CASE

You can use any original PET case; 2001, 4032, 8032, 8296, 8296D, or SuperPET. The SCP should mount inside using existing screw mount at the back but will require standoffs on the front. The SCP will mount in a C64 or 64C case using existing screw mounts.

I am also considering designing a custom SCP case. If you have suggestions please contact me.

STATUS: Complete

FIRMWARE

I want this board to run original unmodified firmware if possible. I still have to work out the details, but the plan is to have the machine boot to a supervisor-type configuration with a menuing system that will let you set your target machine and any optional configuration options you want on boot. The supervisor will then map in specific ROM code and/or write special routines to ram to set up the hardware, including VDC registers, font selection etc and finally executing the original ROM firmware as if from a cold boot. You can also run modified firmware built with my PET EditorROM Project

STATUS: Research mode.

CPLD DEVELOPMENT

An Altera MAX EPM7128 chip will be the CPLD in this design. It is a 5V chip so has no problems interfacing to the rest of the chips. It will provide all the memory mapping, custom control registers and chip select lines. I have never done any CPLD programming so this will be the most challenging part of this project.

STATUS: Research mode.

6502 CPU: PET MODES

I will support 4032 and 8032 PET modes with standard firmware. The VDC can be set up for 40 or 80 column video before the machine is booted. I'm pretty sure the standard PET firmware will not write to any of the extended VDC registers. I also want to support a system that can swap between 40/80 columns using my custom EditorROM project code. This can be modified to write to the VDC to swap modes in real time.

I will try to support 8296 PET models although I have less experience with the memory mapping of that machine, it is all documented so should be straight-forward.

6502 CPU: ColourPET MODE

The ColourPET modes are basically 4032/8032 machines with additional colour. Colour is added in two ways. Additional CHR codes are assigned to PETSCII just like on the VIC/C64 and later machines. The ColourPET used RGBI the same as the C128, so colours match that. You can print these CHR codes inside strings just normal PETSCII. In addition I added ESCAPE CODES similar to those from the C128. There are ESC codes to set colours as well additional screen functionality including toggling between 40 and 80 column modes.

For the above I would also like to have an alternate firmware that supports IEC devices transparently. If possible it would be nice to be able to support both as selectable in some way, perhaps by retargetting device numbers on one buss.

6809 CPU: SuperPET MODE

SuperPET mode will have the ability to run the patched (de-protected) versions of the languages. There is no protection chip in the design. I should be able to support most keyboards as a simple binary patch to the firmware. I do not program 6809 so that will limit me to standard firmware and no support for IEC devices. I don't know if I will be able to include the add-on MMU capability for OS/9 yet, but hope I can.

Z80 CPU: CP/M MODE

There was a Z80 board for the PET called the Madison Z-RAM (or CP/Maker in Europe). Unfortunately this board relied on the 6502 mode to operate. Since the 6502 will be disabled we probably can't use the firmware or software. Most likely I will have to port some generic CP/M version to my platform. I have some limited knowledge of 8088 assembly language and by extension z80 so I should be able to port some well-documented bios. Adding support for cbm drives may prove to be a bit of a challenge.

RESOURCES

The following are resources used in this project:

PICTURES

Some pictures of the project development and results:

HISTORY

Created: Apr 18/2023. Last updated: Apr 27/2023, 7:00pm EST

Send comments or feedback to Steve Gray(sjgray@rogers.com)